package com.ourcraft.informationcollectionsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@TableName("User")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer userId;
    private String userPassword;
    private Boolean userStatus;
    private Integer roleId;
    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private Integer authority;

    public User(String userPassword, Integer roleId){
        this.userPassword = userPassword;
        this.userStatus = true;
        this.roleId = roleId;
    }
}
